home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE23 / SURVIVE / tables.sql < prev    next >
Text File  |  1997-05-19  |  1KB  |  35 lines

  1. connect "e:\sst\articles\9707\code\demo.gdb"
  2.   user "SYSDBA" password "masterkey";
  3.  
  4. create generator Gen_CreditNo;
  5. commit;
  6.  
  7. drop table PaymentMethods;
  8. create table PaymentMethods
  9. (
  10.   PayMethodCode      char(2) not null primary key,
  11.   PayMethodName      char(20) not null,
  12.   Sequence           smallint not null
  13. );
  14. commit;
  15.  
  16. insert into PaymentMethods values ('CS', 'Cash',              1);
  17. insert into PaymentMethods values ('CK', 'Personal Check',    2);
  18. insert into PaymentMethods values ('TC', 'Traveler''s Check', 3);
  19. insert into PaymentMethods values ('CC', 'Cashier''s Check',  4);
  20. insert into PaymentMethods values ('OT', 'Other',             5);
  21.  
  22. drop table Credits;
  23. create table Credits
  24. (
  25.   CreditNo        integer not null primary key,
  26.   Status          char(1) default 'V' not null,
  27.   CustNo          integer not null,
  28.   Amount          float default 0 not null,
  29.   BalanceDue      float default 0 not null,
  30.   IssueDateTime   date default 'now' not null
  31. );
  32. commit;
  33. exit;
  34.  
  35.